<?php use application\Comm\Func;use application\Comm\Request;?>
<table id="doc-datagrid-table4" data-toggle="datagrid" data-options="{
    columns: [{name:'id', width:'50', label:'ID',align:'center'},{name:'name', width:'200', label:'名称',align:'center'}, {name:'status', width:'120', label:'状态',align:'center'}, {name:'action', label:'操作',align:'center'}],
    dataUrl: '<?php echo Func::createUrl('producttag/addlistdo',['id'=>Request::getParam('pid')])?>',
    fullGrid: true,
    paging: {pageSize:5, selectPageSize:'10,20', pageCurrent:1, showPagenum:5},
}">

</table>
<script>
    function do_add($obj) {
        $id = $obj.attr("data-id")
        $img = $obj.attr("data-img")
        $title = $obj.attr("data-title")
        $obj.parent().html('已添加');
        $.post("<?php echo Func::createUrl('producttagrelat/add')?>", {
            pid: '<?php echo \application\Comm\Request::getParam('pid')?>',
            id: $id
        }, function (d) {
            $("#bjui-navtab").navtab('refresh', 'dialog-mask4')
        });
    }

    function do_remove() {
        $(".img-list").click(function () {
            $(this).remove();
        })
    }
</script>
